import fs from 'fs';
import { createHash } from 'crypto';

export function getFileContentHash(file: string) {
  const buffer = fs.readFileSync(file);
  const hash = createHash('sha256');
  return hash.update(buffer).digest('hex').slice(0, 4);
}
